// vue.config.js
const TransformPages = require('uni-read-pages');
const { webpack } = new TransformPages();
module.exports = {
  configureWebpack: {
    plugins: [
      new webpack.DefinePlugin({
        ROUTES: webpack.DefinePlugin.runtimeValue(() => {
          const tfPages = new TransformPages({
            includes: ['path', 'name', 'aliasPath']
          });
          return JSON.stringify(tfPages.routes);
        }, true)
      })
    ]
  },
  // 无限层级跳转
  transpileDependencies: ['fancy-mini']
  // devServer: {
  //   proxy: {
  //     '/wx': {
  //       target: 'http://10.1.10.21:48140/wx',
  //       changeOrigin: true,
  //       ws: true,
  //       pathRewrite: {
  //         '^/wx': ''
  //       }
  //     }
  //   }
  // }
};
